package validate

// 添加百度网盘用户
type AddPanUserData struct {
	Id         int64  `json:"id"`
	BaiduName  string `json:"baidu_name" binding:"required,max=255"`
	ExpiryTime string `json:"expiry_time"`
	TenantId   int64  `json:"tenant_id" binding:"required"`
	UnionId    uint64 `json:"union_id" binding:"required"`
	BaiduUid   uint64 `json:"baidu_uid"`
	LinkType   string `json:"link_type"`
	IsDefault  string `json:"is_default"`
}

// 更新百度网盘用户
type UpdatePanUserData struct {
	Id         uint64 `json:"id" binding:"required"`
	BaiduName  string `json:"baidu_name" binding:"required,max=255"`
	ExpiryTime string `json:"expiry_time" binding:"required"`
}

// 查询用户指定盘id过滤条件
type GetUserAppointPanIdFilter struct {
	Id    uint64 `json:"id" binding:"required"`
	Start int    `json:"start"`
	Limit int    `json:"limit"`
	Path  string `json:"path"`
}

// 查询用户指定盘文件列表过滤条件
type GetUserAppointPanFileListFilter struct {
	Id  int64  `json:"id" binding:"required"`
	Dir string `json:"dir" binding:"required"`
}

// 创建文件夹参数
type CreatePanParam struct {
	Id         uint64 `json:"id" binding:"required"`
	Path       string `json:"path" binding:"required"`
	Size       uint64 `json:"size"`
	Isdir      uint   `json:"isdir"`
	Rtype      uint   `json:"rtype"`
	Uploadid   string `json:"uploadid"`
	BlockList  string `json:"block_list"`
	LocalCtime uint64 `json:"local_ctime"`
	LocalMtime uint64 `json:"local_mtime"`
	ZipQuality uint   `json:"zip_quality"`
	ZipSign    string `json:"zip_sign"`
	IsRevision uint   `json:"is_revision"`
	Mode       uint   `json:"mode"`
	ExifInfo   string `json:"exif_info"`
}

// 记录百度网盘文件参数
type RecordPanFileParam struct {
	PanUserId      uint64 `json:"pan_user_id" binding:"required"`
	FsId           uint64 `json:"fs_id" binding:"required,max=64"`
	Md5            string `json:"md5" binding:"max=64"`
	ServerFilename string `json:"server_filename" binding:"required"`
	Category       int    `json:"category" binding:"required"`
	Path           string `json:"path" binding:"required"`
	Size           int64  `json:"size" binding:"required"`
	Ctime          int64  `json:"ctime" binding:"required"`
	Mtime          int64  `json:"mtime" binding:"required"`
	IsDir          int    `json:"isdir"`
	FromShareId    uint64 `json:"from_share_id"`
}

type GetPanFileIdFilter struct {
	Id     int64  `json:"id" binding:"required"`
	UserId uint64 `json:"user_id" binding:"required"`
}

type SharePanAuthParam struct {
	UnionId uint64 `json:"union_id" binding:"required"`
	Name    string `json:"name" binding:"required"`
}

type GenerateShareUrl struct {
	PanUserId    uint64   `json:"pan_user_id" binding:"required"`
	FileFsIdList []uint64 `json:"file_fs_id_list" binding:"required"`
}

type TransferShareFile struct {
	PanUserId    uint64 `json:"pan_user_id" binding:"required"`
	PanShareId   uint64 `json:"pan_share_id" binding:"required"`
	RelativePath string `json:"relative_path" binding:"required"`
}

type GetLoginData struct {
	//QrcodeName string `json:"qrcode_name" binding:"required"`
	CacheName string `json:"cache_name" binding:"required"`
}

type GetPanUserByUnionId struct {
	UnionId uint64 `json:"union_id" binding:"required"`
}

type GetAuthorizeUrl struct {
	PanUserId uint64 `json:"pan_user_id" binding:"required"`
}

type PanFileManage struct {
	PanUserId uint64 `json:"pan_user_id" binding:"required"`
	Opera     string `json:"opera" binding:"required"`
	Async     int    `json:"async"`
	FileList  string `json:"file_list" binding:"required"`
	Ondup     string `json:"ondup"`
}

type RegenerateShare struct {
	ShareId uint64 `json:"share_id"`
}

type SelectBoundPanUser struct {
	UnionId  uint64 `json:"union_id" binding:"required"`
	LinkType string `json:"link_type" binding:"required"`
}

type SetDefaultUser struct {
	PanUserId uint64 `json:"pan_user_id" binding:"required"`
}

type GetPanUserById struct {
	PanUserId uint64 `json:"pan_user_id" binding:"required"`
}

type GetCurrentDefaultPanUser struct {
	LinkType string `json:"link_type" binding:"required,oneof=user tenant"`
}
